<template>
	<view class="count">
		<view class="code f f-a-c f-j-c f-d-c m-b-20">
			<image :src="group_qrcode" :show-menu-by-longpress="true" class="codeImg" mode=""></image>
			<view class="jieShao">长按二维码，加入猫猫群</view>
			<view @click="shareToWeChat" class="comFig">保存二维码</view>
		</view>
		<!-- <image src="/static/da.png" class="image" mode=""></image> -->
		<u-parse :html="group_page_content"></u-parse>

		<!-- <view class=""> -->
		<!-- </view> -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				group_page_content: uni.getStorageSync('group_page_content'),
				group_qrcode: uni.getStorageSync('group_qrcode')
			}
		},
		methods: {
			// 点击保存
			shareToWeChat() {
				wx.downloadFile({
					url: this.group_qrcode,
					success: (res) => {
						wx.showShareImageMenu({
							path: res.tempFilePath,
							success: res => {
								this.$msg('保存成功')
							},
							fail: red => {
								this.$msg('保存失败')
							}
						})

					}

				})

			},
		}
	}
</script>

<style lang="scss" scoped>
	.image {
		width: 100%;
		height: 100%;
		margin-top: 40rpx;
	}

	.count {
		padding-top: 60rpx;
		height: 100vh;
		width: 100%;
		overflow: auto;
		background-color: #fffefc;
	}

	.code {

		.codeImg {
			width: 200rpx;
			height: 200rpx;
		}

		.comFig {
			width: 264rpx;
			height: 88rpx;
			line-height: 85rpx;
			background: #ffffff;
			border: 2rpx solid #977961;
			border-radius: 46rpx;
			font-size: 28rpx;
			font-family: PingFang SC, PingFang SC-500;
			font-weight: 500;
			text-align: center;
			color: #977961;
		}

		.jieShao {
			font-size: 28rpx;
			font-family: PingFang SC, PingFang SC-400;
			font-weight: 400;
			text-align: center;
			color: #2f2319;
			margin: 30rpx 0;
		}
	}
</style>